<?php
   include "Connecting to a Database.php";

   if(isset($_POST['user'])){
    $user = $_POST['user'];//获取前端传入的值，并且存入变量。
    $resule = $conn->query("select * from registry_login where tel='$user'");//查询
    if($resule->fetch_assoc()){

    }
    else{
        $conn->query("INSERT INTO registry_login(`sid`, `username`, `tel`, `password`) VALUES (null,null,'$user',null)");
        
    }
  }
  header('location:http://localhost/my-wangyi/frontend/index1.html');
    
?>